#ifndef __GAME__HH__
#define __GAME__HH__

#include <iostream>
#include <Header.hh>
#include <GameComponent.hh>
#include <GameTime.hh>
#include <RessourceManager.hh>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

#include <Player.hh>
#include <Bullet.hh>
#include <Background.hh>
#include <GameScreen.hh>

class Game  :   public  GameComponent, public GameScreen
{
public:
    Game(sf::RenderWindow &);
    virtual ~Game(void);

public:
    int            Run(void);
    bool            IsRunning(void);
    void            RunOneFrame(void);
    virtual void    Initialize(void);
    void            LoadContent(void);
    virtual void    Update(Time);
    void            Draw(Time);
    void            UnLoadContent(void);
    void            Exit(void);

public:
    void            AddBullet();
    void            UpdateBullets(Time);
    void            DrawBullets(Time);

private:
    bool        _IsRunning;
    Time        _TargetElapsedTime;
    Window      &_Window;
    GameTime    *_GameTime;
    Time        _FireTime;
    Time        _PreviousFire;
    Time        _Timer;

    RessourceManager    *_Content;
    Player              *_Player;
    std::list<Bullet*>  _Bullets;
    Background          *_Background;
};

#endif // __GAME__HH__
